package com.kaishengit.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.ProviderDao;
import com.kaishengit.pojo.Provider;

@Service
@Transactional
public class ProviderService {
	private ProviderDao providerDao;
	public void add(Provider provider){
		providerDao.add(provider);
	}
	public void edit(Provider provider){
		providerDao.edit(provider);
	}
	public void del(String id){
		providerDao.del(id);
	}
	
	public List<Provider> findAll(){
		return providerDao.findAll();
	}
	public Provider findById(String id) {
		return providerDao.findById(id);
	}
	
	@Autowired
	public void setProviderDao(ProviderDao providerDao) {
		this.providerDao = providerDao;
	}
	
	
}
